import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysMenuService } from './sys-menu.service';
import { CreateSysMenuDto } from './dto/create-sys-menu.dto';
import { UpdateSysMenuDto } from './dto/update-sys-menu.dto';

@Controller('sys-menu')
export class SysMenuController {
  constructor(private readonly sysMenuService: SysMenuService) {}

  @Post()
  create(@Body() createSysMenuDto: CreateSysMenuDto) {
    return this.sysMenuService.create(createSysMenuDto);
  }

  @Get()
  findAll() {
    return this.sysMenuService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysMenuService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysMenuDto: UpdateSysMenuDto) {
    return this.sysMenuService.update(+id, updateSysMenuDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysMenuService.remove(+id);
  }
}
